/*
 * @Description:
 * @Autor: zhzj
 * @Date: 2021-01-04 14:58:14
 * @LastEditors: zhzj
 * @LastEditTime: 2020-01-04 14:58:14
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 获取表格数据
export const getCheckingData = params => axios.get(`${SERVER.CMSCLOUD_WMS}/serviceass/pdichecking/selectcheckinglist`, { params });
// 获取PDI区域-项目
export const getCheckingGroup = params => axios.get(`${SERVER.CMSCLOUD_WMS}/serviceass/pdichecking/getcheckinggroup`, { params });
// 保存
export const postSave = (params) => axios.post(`${SERVER.CMSCLOUD_WMS}/serviceass/pdichecking/save`, params)
// 获取已存在PDI区域-项目
export const getExistCheckingGroup = params => axios.get(`${SERVER.CMSCLOUD_WMS}/serviceass/pdichecking/getexistcheckinggroup`, { params });
// 获取表格数据
export const getVehicleList = params => axios.get(`${SERVER.CMSCLOUD_WMS}/serviceass/pdichecking/getvehiclelist`, { params });

// 获取当前登录用户的所有信息
export const getdeal = params => axios.get(`${SERVER.CMSCLOUD_WMS}/serviceass/pdichecking/getdeal`,{params});

// 查询销售的车辆信息
export const getCar = params => axios.get(`/api/datacenter/sales/getVehicleForZSApp`,{params});

// 查询该车辆是否做过PDI
export const findPdiList = params => axios.get(`${SERVER.CMSCLOUD_WMS}/serviceass/pdichecking/findPdiList`,{params});

// 反写销售车辆是否做过PDI
export const updateCar = vin => axios.post(`${SERVER.RETAIL}/vehicle/updateVehicleForZSApp?vin=${vin}`);
